package n1936;

import java.util.Scanner;

public class Main {

	
	static boolean solve(String s,String t)
	{
		if(s.length()>t.length())return false;
		
		int i=0,j=0;
		while(i<s.length()&&j<t.length())
		{
			if(s.charAt(i)==t.charAt(j))
			{
				i++;
			}
			j++;
		}
		
		if(i==s.length())return true;
		
		return false;
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		Scanner cin=new Scanner(System.in);
		
		while(cin.hasNext())
		{
			String s=cin.next();
			String t=cin.next();
			if(solve(s, t))
			{
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}
		
	}

}
